<!DOCTYPE html>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title></title>
		<meta charset="utf-8" />
		<script src="../../scripts/jquery-1.3.1.js" type="text/javascript"></script>
		<script src="../../scripts/assist.js" type="text/javascript"></script>
		<style type="text/css">
			.style1 {
				width: 100%;
			}
		</style>
		<script type="text/javascript">
			$(function() {
				$("#chkAll").click(function() {
					if ($(this).is(":checked")) {
						$("#tb :checkbox").attr("checked", true);
						$("#chkRev").attr("checked", false);
					} else {
						$("#tb :checkbox").attr("checked", false);
					}
				})
				$("#chkRev").click(function() {
					$("#chkAll").attr("checked", false);
					$("#tb :checkbox").each(function() {
						$(this).attr("checked", !$(this).attr("checked"));
					})
				})
				$("#tb :checkbox").change(function() {
					if ($("#tb :checked").length === $("#tb :checkbox").length) {
						$("#chkAll").attr("checked", true);
					}else{
						$("#chkAll").attr("checked", false);
					}
				})
			})
		</script>
	</head>
	<body>
		<!--<div>
        <select id="Select1" multiple="multiple">
            <option>张三</option>
            <option>李四</option>
            <option>王五</option>
            <option>越六</option>
        </select>
    </div>
    <div>
        <select id="Select2" multiple="multiple">
            <option>钱七</option>
        </select>
    </div>-->
		<div style="background-color:Green"></div>
		<div>
			<input id="chkAll" type="checkbox" />全选
			<input id="chkRev" type="checkbox" />返选
		</div>
		<div>

			<table id="tb" class="style1">
				<tbody>
					<tr>
						<td>
							<input name="chkItem" type="checkbox" />
						</td>
						<td>
							&nbsp;
						</td>
						<td>
							&nbsp;
						</td>
						<td>
							&nbsp;
						</td>
						<td>
							&nbsp;
						</td>
					</tr>
					<tr>
						<td>
							<input name="chkItem" type="checkbox" />
						</td>
						<td>
							b
						</td>
						<td>
							&nbsp;
						</td>
						<td>
							&nbsp;
						</td>
						<td>
							&nbsp;
						</td>
					</tr>
					<tr>
						<td>
							<input name="chkItem" type="checkbox" />
						</td>
						<td>
							&nbsp;
						</td>
						<td>
							c
						</td>
						<td>
							&nbsp;
						</td>
						<td>
							&nbsp;
						</td>
					</tr>
					<tr>
						<td>
							<input name="chkItem" type="checkbox" />
						</td>
						<td>
							&nbsp;
						</td>
						<td>
							&nbsp;
						</td>
						<td>
							d
						</td>
						<td>
							&nbsp;
						</td>
					</tr>
					<tr>
						<td>
							<input name="chkItem" type="checkbox" />
						</td>
						<td>
							&nbsp;
						</td>
						<td>
							&nbsp;
						</td>
						<td>
							&nbsp;
						</td>
						<td>
							e
						</td>
					</tr>
					<tr>
						<td>
							<input name="chkItem" type="checkbox" />
						</td>
						<td>
							&nbsp;
						</td>
						<td>
							&nbsp;
						</td>
						<td>
							f
						</td>
						<td>
							&nbsp;
						</td>
					</tr>
					<tr>
						<td>
							<input name="chkItem" type="checkbox" />
						</td>
						<td>
							&nbsp;
						</td>
						<td>
							g
						</td>
						<td>
							&nbsp;
						</td>
						<td>
							&nbsp;
						</td>
					</tr>
					<tr>
						<td>
							<input name="chkItem" type="checkbox" />
						</td>
						<td>
							h
						</td>
						<td>
							&nbsp;
						</td>
						<td>
							&nbsp;
						</td>
						<td>
							&nbsp;
						</td>
					</tr>
					<tr>
						<td>
							<input name="chkItem" type="checkbox" />
						</td>
						<td>
							&nbsp;
						</td>
						<td>
							&nbsp;
						</td>
						<td>
							&nbsp;
						</td>
						<td>
							&nbsp;
						</td>
					</tr>
					<tr>
						<td>
							<input name="chkItem" type="checkbox" />
						</td>
						<td>
							j
						</td>
						<td>
							&nbsp;
						</td>
						<td>
							&nbsp;
						</td>
						<td>
							&nbsp;
						</td>
					</tr>
				</tbody>
			</table>
		</div>
	</body>
</html>
